package com.cloudkinto.common.utils.dict;

import cn.hutool.core.util.StrUtil;
import com.cloudkinto.common.constant.SysConstant;
import com.cloudkinto.common.utils.StringsUtil;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

import java.util.*;

public class StaticDict {

    /**
     * 平台子状态
     */
    @Getter
    public enum Company_Type {
        Labella("labella", "labella"),
        KK("kk", "kk"),
        Lemooli("lemooli", "lemooli");

        private final String value;
        private final String text;


        Company_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Company_Type type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }



    /**
     * 平台订单审核失败code
     */
    @Getter
    public enum PlatformOrder_Audit_Code {
        OrderNo_Repeat("OrderNo_Repeat", "订单号重复", 0),
        Stock_NotEnough("Stock_NotEnough", "库存不足", 0),
        Sku_NotMatch("Sku_NotMatch", "平台SKU未匹配", 0),
        AFN_Order("AFN_Order", "AFN订单", 0),
        PlatformSku_NUll("PlatformSku_NUll", "无平台sku", 0),
        GetTrackId_Error("GetTrackId_Error", "物流渠道问题", 0),
        PUSH_WMS_ERROR("PUSH_WMS_ERROR", "推送到wms异常", 0),
        OTHER("other", "其他", 0);


        private String value;
        private String text;
        private int type;

        PlatformOrder_Audit_Code(String value, String text, int type) {
            this.value = value;
            this.text = text;
            this.type = type;
        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (PlatformOrder_Audit_Code type : PlatformOrder_Audit_Code.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    public static List<Map<Object, Object>> getPlatformOrder_Audit_Code() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.PlatformOrder_Audit_Code value : StaticDict.PlatformOrder_Audit_Code.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    @Getter
    public enum Operate_Log_PlatformProduct {
        parentSku("parentSku", "管理番号", 0),
        stockPercent("stockPercent", "库存预留占比", 0),
        inventoryLink("inventoryLink", "库存联动", 2),
        productPresale("productPresale", "预售", 1),

        shippingDayId("shippingDayId", "配货准备时间", 0),
        systemSku("systemSku", "系统sku", 0);
        private String value;
        private String text;
        private int type;

        Operate_Log_PlatformProduct(String value, String text, int type) {
            this.value = value;
            this.text = text;
            this.type = type;
        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Operate_Log_PlatformProduct type : Operate_Log_PlatformProduct.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
        public static int getType(String value) {
            if (value == null) {
                return 0;
            }
            for (Operate_Log_PlatformProduct type : Operate_Log_PlatformProduct.values()) {
                if (value.equals(type.getValue())) {
                    return type.getType();
                }
            }
            return 0;
        }
    }


    /**
     * 乐天店铺回信邮箱的smtp
     */
    @Getter
    public enum Rakuten_Mail_Account_Smtp {
        Smtp_Rakuten("sub.fw.rakuten.ne.jp", "smtp");

        private String value;
        private String text;


        Rakuten_Mail_Account_Smtp(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Rakuten_Mail_Account_Smtp type : Rakuten_Mail_Account_Smtp.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }



    @Getter
    public enum Mail_Type {
        QQ("@qq.com", "smtp.qq.com", "imap.qq.com", "QQ邮箱", "icon-QQyouxiang"),
        NetEase("@163.com", "smtp.163.com", "imap.163.com", "网易云邮箱", "icon-num163"),
        Ease126("@126.com", "smtp.126.com", "imap.126.com", "126网易免费邮", "icon-youxiang1"),
        Sina("@sina.com", "smtp.sina.com", "smtp.sina.com", "新浪邮箱", "icon-xinlangyouxiang"),
        Outlook("@outlook.com", "smtp.office365.com", "outlook.office365.com", "outlook邮箱", "icon-Outlook"),
        Gmail("@gmail.com", "smtp.gmail.com", "imap.gmail.com", "谷歌邮箱", "icon-guge");

        private String value;
        private String smtp;
        private String imap;
        private String text;
        private String icon;

        Mail_Type(String value, String smtp, String imap, String text, String icon) {
            this.value = value;
            this.smtp = smtp;
            this.imap = imap;
            this.text = text;
            this.icon = icon;
        }

        public static String getSmtp(String value) {
            if (value == null) {
                return "";
            }
            for (Mail_Type type : Mail_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getSmtp();
                }
            }
            return "";
        }

        public static String getImap(String value) {
            if (value == null) {
                return "";
            }
            for (Mail_Type type : Mail_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getImap();
                }
            }
            return "";
        }

        public static String getIcon(String smtp) {
            if (smtp == null) {
                return "";
            }
            for (Mail_Type type : Mail_Type.values()) {
                if (smtp.equals(type.getSmtp())) {
                    return type.getIcon();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Mail_Folder_Type {
        Other("其他文件夹", "其他文件夹", "", "其他邮件", "", "[Gmail]"),
        INBOX("INBOX", "收件箱", "INBOX", "INBOX", "Inbox", "INBOX"),
        OUTBOX("Sent Messages", "发件箱", "已发送", "已发送", "Sent", "已发邮件"),
        DRAFTS("Drafts", "草稿箱", "草稿箱", "草稿夹", "Drafts", "草稿"),
        DELETED("deleted", "已删除", "已删除", "已删除", "Deleted", "已删除邮件"),
        JUNK("Junk", "垃圾箱", "垃圾邮件", "垃圾邮件", "Junk", "垃圾邮件");
        private String value;
        private String text;
        private String ease;
        private String sina;
        private String outlook;
        private String gmail;

        Mail_Folder_Type(String value, String text, String ease, String sina, String outlook, String gmail) {
            this.value = value;
            this.text = text;
            this.ease = ease;
            this.sina = sina;
            this.outlook = outlook;
            this.gmail = gmail;
        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Mail_Folder_Type type : Mail_Folder_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static String getValueByEase(String ease) {
            if (ease == null) {
                return "";
            }
            for (Mail_Folder_Type type : Mail_Folder_Type.values()) {
                if (ease.equals(type.getEase())) {
                    return type.getValue();
                }
            }
            return "";
        }

        public static String getValueBySina(String sina) {
            if (sina == null) {
                return "";
            }
            for (Mail_Folder_Type type : Mail_Folder_Type.values()) {
                if (sina.equals(type.getSina())) {
                    return type.getValue();
                }
            }
            return "";
        }

        public static String getValueByOutlook(String outlook) {
            if (outlook == null) {
                return "";
            }
            for (Mail_Folder_Type type : Mail_Folder_Type.values()) {
                if (outlook.equals(type.getOutlook())) {
                    return type.getValue();
                }
            }
            return "";
        }

        public static String getValueByGmail(String gmail) {
            if (gmail == null) {
                return "";
            }
            for (Mail_Folder_Type type : Mail_Folder_Type.values()) {
                if (gmail.equals(type.getGmail())) {
                    return type.getValue();
                }
            }
            return "";
        }
    }


    /**
     * 附件 一对多 类型
     */

    @Getter
    public enum File_Type {
        NewProduct("newProduct", "新品开发图片"),
        ReceiveNote("receiveNote", "收货单附件"),
        QualityCheckPic("qualityCheckPic", "质检单图片"),
        QualityCheckFile("qualityCheckFile", "质检单附件"),
        Rakuten("rakuten", "乐天邮件附件"),
        Mail("mail", "邮件"),
        Oversea("oversea", "海外仓备货单附件"),
        RepairAttach("repairAttach", "维修管理附件"),
        RepairPic("repairPic", "维修管理维修照片"),
        Labella_Header("Labella_Header", "Labella_LOGO_图标"),
        Kk_Header("Kk_Header", "KK_LOGO_图标"),
        OrderReturn_Cus("orderReturn_customer", "退件(客户)"),
        OrderReturn_Ware("orderReturn_warehouse", "退件(仓库)"),
        Cost("Cost", "业务费用"),
        Defective("Defective", "次品处理");

        private String value;
        private String text;


        File_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (File_Type type : File_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    @Getter
    public enum Rule_Type {
        Finance(6L, "财务");
        private Long value;
        private String text;


        Rule_Type(Long value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Long value) {
            if (value == null) {
                return "";
            }
            for (Rule_Type type : Rule_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }





    @Getter
    public enum Product_Flowing_Type {
        OrderRepair("orderRepair", "维修订单部件"),
        ReleaseLock("releaseLock", "一件代发释放锁定库存"),
        CutOff("cutOff", "截单"),
        DistributeStore("distributeStore", "配货区调货"),
        DistributeStock("distributeStock", "分配库存"),
        RackUpdate("rackUpdate", "更新库存"),
        Back("back", "退货单"),
        Output("output", "出库单"),
        Input("input", "入库单"),
        InputRoll("inputRoll", "入库单回滚"),
        FbaOutput("fbaOutput", "fba发货记录"),
        FbaOutputRoll("fbaOutputRoll", "fba回滚记录"),
        FbaSend("fbaSend", "fba发货记录");
        private String value;
        private String text;


        Product_Flowing_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Product_Flowing_Type type : Product_Flowing_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Repair_Status_Type {
        ToCheck("toCheck", "待确认"),
        Checked("checked", "已确认"),
        Repairing("repairing", "维修中"),
        Repaired("repaired", "维修完成"),
        //        Indicate("indicate", "客户指示"),
//        FinishIndicate("finishIndicate", "完成指示"),
        //Paid("paid", "已收费"),
        Finish("finish", "订单完成"),
        Discard("discard", "废弃");

        private String value;
        private String text;


        Order_Repair_Status_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Repair_Status_Type type : Order_Repair_Status_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Repair_Operate_Type {
        OrderRepair_Delete_RepairPic("OrderRepair_Delete_RepairPic", "删除维修附件: %1$s"),
        OrderRepair_Delete_Attach("OrderRepair_Delete_Attach", "删除附件: %1$s"),
        OrderRepair_Upload_RepairPic("OrderRepair_Upload_RepairPic", "上传维修附件: %1$s"),
        OrderRepair_Upload_Attach("OrderRepair_Upload_Attach", "上传附件: %1$s"),
        OrderRepair_DeleteComponent("OrderRepair_DeleteComponent", "删除部件: %1$s"),
        OrderRepair_DeleteSku("OrderRepair_DeleteSku", "删除Sku: %1$s"),
        OrderRepair_Update("OrderRepair_Update", "更新维修订单"),
        OrderRepair_Create("OrderRepair_Create", "创建维修订单"),
        OrderRepair_MarkConfirm("OrderRepair_MarkConfirm", "标记已确认"),
        OrderRepair_Discard("OrderRepair_Discard", "废弃"),
        OrderRepair_BeginRepair("OrderRepair_BeginRepair", "开始维修"),
        OrderRepair_PartRepair("OrderRepair_PartRepair", "部分维修完成"),
        OrderRepair_FinishRepair("OrderRepair_FinishRepair", "维修完成"),
        OrderRepair_CannotRepair("OrderRepair_CannotRepair", "无法维修"),
        OrderRepair_CusIndicate_Grounding("OrderRepair_CusIndicate_Grounding", "客户指示上架"),
        OrderRepair_CusIndicate_Discard("OrderRepair_CusIndicate_Discard", "客户指示上架"),
        OrderRepair_FinishIndicate_Grounding("OrderRepair_FinishIndicate_Grounding", "完成指示上架"),
        OrderRepair_FinishIndicate_Discard("OrderRepair_FinishIndicate_Discard", "完成指示废弃"),
        OrderRepair_Charge("OrderRepair_Charge", "收费");
        private String value;
        private String text;


        Order_Repair_Operate_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Repair_Operate_Type type : Order_Repair_Operate_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Track_Match_Status {
        UnMatch(0, "未匹配"),
        Matched(1, "已匹配"),
        PartMatched(2, "部分匹配");

        private Integer value;
        private String text;


        Track_Match_Status(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Track_Match_Status type : Track_Match_Status.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Message_Notice_Type {
        RackMore("rack_more", "库位-利用率过大"),
        RackLess("rack_less", "库位-利用率过低");

        private String value;
        private String text;


        Message_Notice_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Message_Notice_Type type : Message_Notice_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Input_Box_Type {
        Tray("tray", "托盘"),
        Box("box", "箱子");

        private String value;
        private String text;


        Order_Input_Box_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Input_Box_Type type : Order_Input_Box_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static String getValueByText(String text) {
            if (text == null) {
                return "";
            }
            for (Order_Input_Box_Type type : Order_Input_Box_Type.values()) {
                if (text.equals(type.getText())) {
                    return type.getValue();
                }
            }
            return "";
        }

    }


    @Getter
    public enum Order_Input_Track_Type {
        Bulk("bulk", "散货"),
        Full("full", "整柜"),
        Air("ari", "空运");

        private String value;
        private String text;


        Order_Input_Track_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Input_Track_Type type : Order_Input_Track_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    @Getter
    public enum Order_Input_Status_Type {
        Ordered("ordered", "已下单"),
        ToStored("toStored", "待入库"),
        Stored("stored", "已入库"),
        Ground("ground", "已上架"),
        Outbound("outbound", "已出库"),
        Problem("problem", "问题件");

        private String value;
        private String text;


        Order_Input_Status_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Input_Status_Type type : Order_Input_Status_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Output_Status_Type {
        Ordered("ordered", "已下单"),
        Audited("audited", "已审核"),
        Paired("paired", "已打单"),
        Ready("ready", "已备货"),
        Shipped("shipped", "已发货"),
        Received("received", "已签收"),
        Problem("problem", "问题件");
        private String value;
        private String text;


        Order_Output_Status_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Output_Status_Type type : Order_Output_Status_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Output_Send_Type {
        Express("express", "快递"),
        Logistics("logistics", "物流"),
        TonCar("tonCar", "吨车");

        private String value;
        private String text;


        Order_Output_Send_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Output_Send_Type type : Order_Output_Send_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    @Getter
    public enum Order_Address_Type {
        Fba("fba", "FBA地址"),
        Private("private", "常用地址");

        private String value;
        private String text;


        Order_Address_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Address_Type type : Order_Address_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Problem_Good_Status_Type {
        Tray("transit", "在途"),
        Box("stored", "在库"),
        Shipped("shipped", "已发货"),
        Received("received", "已签收");

        private String value;
        private String text;


        Order_Problem_Good_Status_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Problem_Good_Status_Type type : Order_Problem_Good_Status_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Box_Flowing_Type {
        Split("split", "拆分"),
        Merge("merge", "合并"),
        In("in", "入库"),
        Out("out", "出库");

        private String value;
        private String text;


        Order_Box_Flowing_Type(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Box_Flowing_Type type : Order_Box_Flowing_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    @Getter
    public enum Order_CM_Account_Key {
        Account1("2363", "1iDmI3Kr6O"),
        Account2("", "");

        private String value;
        private String text;


        Order_CM_Account_Key(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_CM_Account_Key type : Order_CM_Account_Key.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_CM_Status {
        ToCheck("toCheck", "待分单", 1),
        Checked("checked", "已分单", 1),
        Issued("issued", "已导出", 1),
        Shipped("shipped", "已归档", 1),
        ReOrder("reOrder", "补发单", 1),
        Canceled("canceled", "已取消", 1);

        //注文確認
        //発送待ち
        //★SCシステム用★出荷待ち
        //印刷待ち
        //★SCシステム用★連携済
        //保留・キャンセル
        //完了

        private String value;
        private String text;
        private Integer updateType;// 0代表 批量更新操作 不可以操作


        Order_CM_Status(String value, String text, Integer updateType) {
            this.value = value;
            this.text = text;
            this.updateType = updateType;
        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_CM_Status type : Order_CM_Status.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static Integer getUpdatType(String value) {
            if (value == null) {
                return null;
            }
            for (Order_CM_Status type : Order_CM_Status.values()) {
                if (value.equals(type.getValue())) {
                    return type.getUpdateType();
                }
            }
            return null;
        }
    }


    @Getter
    public enum Order_CM_Track {
        YamatoOne(100L, "黑猫投函"),
        YamatoMore(200L, "投函多件"),
        YamatoZhai(300L, "黑猫宅急便"),
        Sagawa(400L, "佐川宅急便"),
        KKKK(500L, "コンパクト");

        private final Long value;
        private final String text;


        Order_CM_Track(Long value, String text) {
            this.value = value;
            this.text = text;
        }

        public static String getText(Long value) {
            if (value == null) {
                return "";
            }
            for (Order_CM_Track type : values()) {
                if (value.equals(type.getValue())) {
                    return StringsUtil.createI18Message(type.getText());
                }
            }
            return "";
        }

        public static Order_CM_Track getTrack(Long value) {
            if (value == null) {
                return null;
            }
            for (Order_CM_Track type : values()) {
                if (value.equals(type.getValue())) {
                    return type;
                }
            }
            return null;
        }
    }


    @Getter
    public enum Order_CM_Order_Type {
        ToCheck(0, "日常"),
        Checked(1, "预售"),
        Issued(2, "翌日达");

        private final Integer value;
        private final String text;


        Order_CM_Order_Type(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Order_CM_Order_Type type : values()) {
                if (value.equals(type.getValue())) {
                    return StringsUtil.createI18Message(type.getText());
                }
            }
            return "";
        }
    }


    @Getter
    public enum CM_Storage {
        ThirdStorage(100L, "第三方仓库"),
        MyselfStorage(200L, "自有仓库");

        private Long value;
        private String text;


        CM_Storage(Long value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Long value) {
            if (value == null) {
                return "";
            }
            for (CM_Storage type : CM_Storage.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Product_Stock_CM {
        Stock("stock", "库存");


        private String value;
        private String text;


        Product_Stock_CM(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Product_Stock_CM type : Product_Stock_CM.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    @Getter
    public enum Product_CM {
        ItemName("itemName", "商品名称"),
        ItemMemo("itemMemo", "备注"),
        itemCode("itemCode", "商品代码"),
        attribute_code_h("attribute_code_h", "属性1"),
        attribute_code_v("attribute_code_v", "属性2"),
        product_type("product_type", "品目"),
        local_stock_count("local_stock_count", "本地仓库存"),
        api_stock_count("api_stock_count", "第三方仓库存");


        private String value;
        private String text;


        Product_CM(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Product_CM type : Product_CM.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Order_Delivery_Type {
        /**
         * 投函
         */
        X1("1001", new String[]{"ネコポス", "投函"}),
        /**
         * 邮件航班
         */
        X2("003", new String[]{"(ヤマト)メール便"}),
        /**
         * 佐川
         */
        X3("1002", new String[]{"佐川急便", "佐川宅急便"}),
        /**
         * 宅急便
         */
        x4("001", new String[]{"黑猫宅急便", "ヤマト（宅急便）"});

        /**
         * 配送服务代码
         */
        private final String value;
        /**
         * 配送服务名
         */
        private final String[] name;

        Order_Delivery_Type(String value, String[] name) {
            this.value = value;
            this.name = name;
        }

        public static String getValue(String name) {
            if (StringUtils.isEmpty(name)) {
                return "";
            }
            for (Order_Delivery_Type type : values()) {
                for (String s : type.name) {
                    if (name.contains(s)) {
                        return type.getValue();
                    }
                }
            }
            return "";
        }
    }


    @Getter
    public enum Lc_Carrier {
        Yamato("Yamato", "Yamato"),
        Sagawa("Sagawa", "Sagawa"),
        JapanPost("Japan Post", "Japan Post"),
//        Seino("Seino", "Seino"),
//        UPS("UPS", "ups"),
//        FedEx("FedEx", "fedex"),
//        USPS("USPS", "usps"),
//        DHL("DHL", "dhl"),
//        GLS("GLS", "gls"),
//        DPD("DPD", "dpd"),
//        GO("GO", "go"),
//        Stamps("Stamps", "stamps"),
        Other("Other", "other");

        private final String text;
        private final String value;
        Lc_Carrier(String text, String value) {
            this.value = value;
            this.text = text;

        }
        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Lc_Carrier type : Lc_Carrier.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static String getValue(String text) {
            if (StrUtil.isBlank(text)) {
                return "";
            }
            for (Lc_Carrier type : Lc_Carrier.values()) {
                if (text.equals(type.getText())) {
                    return type.getValue();
                }
            }
            return "";
        }

        public static List<Map<String,String>> getCarrierList() {
            List<Map<String,String>> result = new ArrayList<>();
            for (Lc_Carrier value : Lc_Carrier.values()) {
                Map<String,String> map = new HashMap<>();
                map.put("name", value.getText());
                map.put("code", value.getValue());
                result.add(map);
            }
            return result;
        }
    }


    @Getter
    public enum Surcharge_type {
        Longer(10, "超长"),
        OverWeight(20, "超重"),
        OverSize(30, "OverSize"),
        OverL(40, "超限制"),
        OverS(50, "超尺寸"),
        OverV(60, "超体积");

        private Integer value;
        private String text;


        Surcharge_type(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Surcharge_type type : Surcharge_type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static Integer getValue(String text) {
            if (StringUtils.isBlank(text)) {
                return 0;
            }
            for (Surcharge_type type : values()) {
                if (text.contains(type.getText())) {
                    return type.getValue();
                }
            }
            return 0;
        }
    }


    /**
     * 偏远地区规则 类型
     */
    @Getter
    public enum Surcharge_Faraway_type {
        Longer(100, "偏远(DAS)", "faraway"),
        OverWeight(200, "超偏远(EAS)", "faraway"),
        OverSize(300, "超级偏远(RAS)", "faraway"),
        OverL(400, "超超偏远(SAS)", "faraway"),
        ResidenceSeason(550, "住宅地址附加费", "residence"),
        Signature_Direct(650, "直接签名附加费", "signature"),
        Signature_Indirect(750, "间接签名附加费", "signature"),
        Signature_Adult(850, "成人签名附加费", "signature"),
        Insurance(950, "保险签名附加费", "insurance");


        private Integer value;
        private String text;
        private String type;


        Surcharge_Faraway_type(Integer value, String text, String type) {
            this.value = value;
            this.text = text;
            this.type = type;
        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Surcharge_Faraway_type type : Surcharge_Faraway_type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    public static List<Map<Object, Object>> geFarawayType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Surcharge_Faraway_type value : StaticDict.Surcharge_Faraway_type.values()) {
            if (!value.getType().equals("faraway")) continue;
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }



    /**
     * 附加费-超长超重属性类型
     */
    @Getter
    public enum Sc_Calculate_Type {
        Longest_Side(0, "最长边", 0),
        Second_Longest_Side(1, "次长边", 0),
        Shortest_Size(2, "最短边", 0),
        Fourth(3, "最长边+2*(次长边+最短边)", 0),
        Volume_Weight(4, "体积重", 1),
        Billing_Weight(5, "计费重", 1),
        ThreeSize(6, "三边之和", 0),
        ActualWeight(7, "实重", 1),
        Volume(8, "体积", 2),
        Country(9, "国家/地区", -1);
        private final Integer value;
        private final String text;
        private final int unitType;// 0长度 1重量 2是体积(CBM CBF) -1 无单位

        Sc_Calculate_Type(Integer value, String text, int unitType) {
            this.value = value;
            this.text = text;
            this.unitType = unitType;

        }


        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Sc_Calculate_Type type : Sc_Calculate_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static int getUnitType(Integer value) {
            if (value == null) {
                return 0;
            }
            for (Sc_Calculate_Type type : Sc_Calculate_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getUnitType();
                }
            }
            return 0;
        }
    }



    /**
     * 物流渠道属性类型
     */
    @Getter
    public enum Channel_Calculate_Type {
        Longest_Side(0, "最长边", 0),
        Second_Longest_Side(1, "次长边", 0),
        Shortest_Size(2, "最短边", 0),
        Fourth(3, "最长边+2*(次长边+最短边)", 0),
        Volume_Weight(4, "体积重", 1),
        Billing_Weight(5, "计费重", 1);
        private Integer value;
        private String text;
        private int unitType; // 0长度 1重量

        Channel_Calculate_Type(Integer value, String text, int unitType) {
            this.value = value;
            this.text = text;
            this.unitType = unitType;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Channel_Calculate_Type type : Channel_Calculate_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static int getUnitType(Integer value) {
            if (value == null) {
                return 0;
            }
            for (Channel_Calculate_Type type : Channel_Calculate_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getUnitType();
                }
            }
            return 0;
        }
    }

    /**
     * 物流渠道 超长/超重 操作类型 大于 小于 等于。。。
     */
    @Getter
    public enum Rule_Operate_Sign {
        Greater_Than(7, "大于", ">", "channel_sc"),
        Less_Than(1, "小于", "<","channel_sc"),
        Equal(5, "等于", "=", "sc"),
        Greater_Equal(2, "大于等于", "≥","channel_sc"),
        Less_Equal(3, "小于等于", "≤", "channel_sc"),
        Between(4, "介于", "介于", "channel_sc");

        private Integer value;
        private String text;
        private String sign;
        private String source;


        Rule_Operate_Sign(Integer value, String text, String sign, String source) {
            this.value = value;
            this.text = text;
            this.sign = sign;
            this.source = source;
        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Rule_Operate_Sign type : Rule_Operate_Sign.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static String getSource(Integer value) {
            if (value == null) {
                return "";
            }
            for (Rule_Operate_Sign type : Rule_Operate_Sign.values()) {
                if (value.equals(type.getValue())) {
                    return type.getSource();
                }
            }
            return "";
        }

        public static String getSign(Integer value) {
            if (value == null) {
                return "";
            }
            for (Rule_Operate_Sign type : Rule_Operate_Sign.values()) {
                if (value.equals(type.getValue())) {
                    return type.getSign();
                }
            }
            return "";
        }
    }



    @Getter
    public enum Rule_Operate_Sign_Contain {
        Contain(100, "包含", "包含", "sc"),
        NotContain(200, "除外", "除外","sc");

        private Integer value;
        private String text;
        private String sign;
        private String source;


        Rule_Operate_Sign_Contain(Integer value, String text, String sign, String source) {
            this.value = value;
            this.text = text;
            this.sign = sign;
            this.source = source;
        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Rule_Operate_Sign_Contain type : Rule_Operate_Sign_Contain.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static String getSource(Integer value) {
            if (value == null) {
                return "";
            }
            for (Rule_Operate_Sign_Contain type : Rule_Operate_Sign_Contain.values()) {
                if (value.equals(type.getValue())) {
                    return type.getSource();
                }
            }
            return "";
        }

        public static String getSign(Integer value) {
            if (value == null) {
                return "";
            }
            for (Rule_Operate_Sign_Contain type : Rule_Operate_Sign_Contain.values()) {
                if (value.equals(type.getValue())) {
                    return type.getSign();
                }
            }
            return "";
        }
    }


    @Getter
    public enum OMP_UnitMeasurement {
        Cm("cm", "公制单位(kg/cm)", "kg,cm,CBM", "kg", "cm"),
        In("in", "英制单位(lb/in)", "lb,in,CBF", "lb", "in");


        private String value;
        private String text;
        private String scText;
        private String gong;
        private String ying;
        OMP_UnitMeasurement(String value, String text, String scText, String gong, String ying) {
            this.value = value;
            this.text = text;
            this.scText = scText;
            this.gong = gong;
            this.ying = ying;
        }
        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (OMP_UnitMeasurement type : OMP_UnitMeasurement.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }


        public static String getScText(String value) {
            if (value == null) {
                return "";
            }
            for (OMP_UnitMeasurement type : OMP_UnitMeasurement.values()) {
                if (value.equals(type.getValue())) {
                    return type.getScText();
                }
            }
            return "";
        }
    }


    public static List<Map<Object, Object>> getUnitMeasure() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.OMP_UnitMeasurement value : StaticDict.OMP_UnitMeasurement.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getScText());
            result.add(map);
        }
        return result;
    }



    @Getter
    public enum OMP_Unit {
        Cm("cm", "公制单位(cm)", 0.3937008d),
        Kg("kg", "公制单位(kg)", 2.2046226d),
        In("in", "英制单位(in)", 2.5399999d),
        Lb("lb", "英制单位(lb)", 0.4535923d);


        private String value;
        private String text;
        private double coe;

        OMP_Unit(String value, String text, double coe) {
            this.value = value;
            this.text = text;
            this.coe = coe;

        }
        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (OMP_Unit type : OMP_Unit.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static double getCoe(String value) {
            if (value == null) {
                return 0d;
            }
            for (OMP_Unit type : OMP_Unit.values()) {
                if (value.equals(type.getValue())) {
                    return type.getCoe();
                }
            }
            return 0d;
        }

    }


    /**
     * 操作日志类型表
     */
    @Getter
    public enum Operate_Type {
        Company(11, "客户列表");
        private Integer value;
        private String text;


        Operate_Type(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Operate_Type type : Operate_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    @Getter
    public enum Operate_Log_Company {
        Name("name", "客户名称", 0),
        CompanyName("companyName", "公司名称", 0),
        Status("status", "状态", 1),
        contact("contact", "联系人", 0),
        tel("tel", "电话", 0),
        email("email", "邮箱", 0),
        iossEuTaxNo("iossEuTaxNo", "IOSS欧盟税号", 0),
        address("address", "地址", 0),
        Tips("tips", "备注", 0),
        productFreeTrial("productFreeTrial", "产品免审", 1);
        private String value;
        private String text;
        private int type;

        Operate_Log_Company(String value, String text, int type) {
            this.value = value;
            this.text = text;
            this.type = type;
        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Operate_Log_Company type : Operate_Log_Company.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }


        public static int getType(String value) {
            if (value == null) {
                return 0;
            }
            for (Operate_Log_Company type : Operate_Log_Company.values()) {
                if (value.equals(type.getValue())) {
                    return type.getType();
                }
            }
            return 0;
        }
    }

    public static List<Map<Object, Object>> getOperateBill_Type() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.OperateBill_Type value : StaticDict.OperateBill_Type.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            map.put("type", value.getType());
            result.add(map);
        }
        return result;
    }


    /**
     * 操作费单据类型   和 Cost_Input_OrderType   Cost_Out_OrderType 统一 OperateBill_Type
     */
    @Getter
    public enum OperateBill_Type {
        Input_One(101201, "一件代发&备货中转入库", "input"),
        Input_Two(101, "一件代发入库", "input"),
        Input_Three(201, "备转中转入库", "input"),
//        Input_Four(601, "FBA退货入库", "input"),
        Input_Five(301, "退件", "input"),
        Out_One(401, "一件代发出库", "out"),
        Out_Two(501, "批发出库", "out"),
        Out_DiaoBo(601, "调拨出库", "out");

//        Out_Three(801, "FBA换标服务", "out"),
//        Out_Four(901, "FBA退货出库", "out");


        private Integer value;
        private String text;
        private String type;


        OperateBill_Type(Integer value, String text, String type) {
            this.value = value;
            this.text = text;
            this.type = type;
        }

        public static String getText(Integer value) {
            if (value == null) {
                return "--";
            }
            for (OperateBill_Type type : OperateBill_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "--";
        }

        public static String getType(Integer value) {
            if (value == null) {
                return "";
            }
            for (OperateBill_Type type : OperateBill_Type.values()) {
                if (value.equals(type.getValue())) {
                    return type.getType();
                }
            }
            return "";
        }

    }

    public static List<Map<Object, Object>> getOperateBill_ConditionCode() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.OperateBill_ConditionCode value : StaticDict.OperateBill_ConditionCode.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }




    public static List<Map<Object, Object>> getOperateBill_Sign() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.OperateBill_Sign value : StaticDict.OperateBill_Sign.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            map.put("sign", value.getSign());

            result.add(map);
        }
        return result;
    }

    /**
     * 操作类型 大于 小于 等于。。。
     */
    @Getter
    public enum OperateBill_Sign {
        Greater_Than(7, "大于", ">", "channel_sc"),
        Less_Than(1, "小于", "<", "channel_sc"),
        Equal(5, "等于", "=", "sc"),
        Greater_Equal(2, "大于等于", "≥", "channel_sc"),
        Less_Equal(3, "小于等于", "≤", "channel_sc"),
        Between(4, "介于", "介于", "channel_sc"),
        Include(6, "包含", "include", "channel_sc");

        private Integer value;
        private String text;
        private String sign;
        private String source;


        OperateBill_Sign(Integer value, String text, String sign, String source) {
            this.value = value;
            this.text = text;
            this.sign = sign;
            this.source = source;
        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (OperateBill_Sign type : OperateBill_Sign.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static String getSign(Integer value) {
            if (value == null) {
                return "";
            }
            for (OperateBill_Sign type : OperateBill_Sign.values()) {
                if (value.equals(type.getValue())) {
                    return type.getSign();
                }
            }
            return "";
        }

    }






    /**
     * 仓储费 批量体积进位
     */
    @Getter
    public enum Wh_Rent_FullOneCarryBit {
        Zero(11, "不进位"),
        One(11, "不满1进位(单个库存)"),
        Two(11, "不满1进位(按相同批次)"),
        Three(11, "不满1进位(按批次范围总体积)");

        private Integer value;
        private String text;


        Wh_Rent_FullOneCarryBit(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Wh_Rent_FullOneCarryBit type : Wh_Rent_FullOneCarryBit.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    public static List<Map<Object, Object>> getWh_Rent_FullOneCarryBit() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Wh_Rent_FullOneCarryBit value : StaticDict.Wh_Rent_FullOneCarryBit.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    /**
     * 退件单状态
     */
    @Getter
    public enum Order_Return_Status {
        Zero(0, "草稿"),
        One(1, "待入库"),
        Two(2, "处理中"),
        Three(3, "已完成"),
        Four(4, "已取消");

        private final Integer value;
        private final String text;


        Order_Return_Status(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Order_Return_Status type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    public static List<Map<Object, Object>> getOrder_Return_Status() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Order_Return_Status value : StaticDict.Order_Return_Status.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }



    @Getter
    public enum Regular_ModuleType {
        Zero(10, "设定动作"),
        One(20, "基础信息"),
        Two(30, "仓储物流"),
        Three(40, "订单信息"),
        Four(50, "Mercado"),
        Five(60, "Tiktok");

        private final Integer value;
        private final String text;


        Regular_ModuleType(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Regular_ModuleType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    public static List<Map<Object, Object>> getRegular_ModuleType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Regular_ModuleType value : StaticDict.Regular_ModuleType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }
    /**
     * 平台订单规则大模块下的子模块
     */
    @Getter
    public enum Regular_ChildType {
        Tenth(11, "发货仓库", Regular_ModuleType.Zero.value),
        Eleventh(21, "物流渠道", Regular_ModuleType.Zero.value),
        Zero(31, "自动审核", Regular_ModuleType.Zero.value),
        OrderPlat(41, "订单平台", Regular_ModuleType.One.value),
        One(51, "订单站点", Regular_ModuleType.One.value),
        Two(61, "订单店铺", Regular_ModuleType.One.value),
        Three(71, "收货国家/地区", Regular_ModuleType.Two.value),
        Four(81, "收货邮编", Regular_ModuleType.Two.value),
        Five(91, "订单产品", Regular_ModuleType.Three.value),
        Five_Qty(95, "产品数量", Regular_ModuleType.Three.value),
        Six(101, "估算重量", Regular_ModuleType.Three.value),
        Seven(111, "物流跟踪号", Regular_ModuleType.Three.value),
        Eight(121, "平台承运商", Regular_ModuleType.Four.value),
        Nine(131, "平台承运商", Regular_ModuleType.Five.value);


        private final Integer value;
        private final String text;
        private final Integer moduleId;

        Regular_ChildType(Integer value, String text, Integer moduleId) {
            this.value = value;
            this.text = text;
            this.moduleId = moduleId;
        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Regular_ChildType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    public static List<Map<Object, Object>> getRegular_ChildType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Regular_ChildType value : StaticDict.Regular_ChildType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            map.put("moduleId", value.getModuleId());
            result.add(map);
        }
        return result;
    }


    /**
     * 平台订单拆分规则模块
     */
    @Getter
    public enum Regular_Split_ModuleType {
        Zero(10, "设定动作"),
//        One(20, "基础信息"),
//        Two(30, "仓储物流"),
        Three(40, "订单信息");

        private final Integer value;
        private final String text;
        Regular_Split_ModuleType(Integer value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Regular_Split_ModuleType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }
    public static List<Map<Object, Object>> getRegular_Split_ModuleType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Regular_Split_ModuleType value : StaticDict.Regular_Split_ModuleType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }

    /**
     * 平台订单规则大模块下的子模块
     */
    @Getter
    public enum Regular_Split_ChildType {
        Tenth(11, "执行动作", Regular_Split_ModuleType.Zero.value),
        Eleventh(21, "拆分方式", Regular_Split_ModuleType.Zero.value),
        Twelfth(111, "拆分产品", Regular_Split_ModuleType.Zero.value),


        //        Four(81, "订单产品模式", Regular_Split_ModuleType.Three.value),
        Five(91, "订单产品", Regular_Split_ModuleType.Three.value),

        Six(101, "产品数量", Regular_Split_ModuleType.Three.value);
//        Seven(111, "物流跟踪号", Regular_Split_ModuleType.Three.value);




        private final Integer value;
        private final String text;
        private final Integer moduleId;

        Regular_Split_ChildType(Integer value, String text, Integer moduleId) {
            this.value = value;
            this.text = text;
            this.moduleId = moduleId;
        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Regular_Split_ChildType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    public static List<Map<Object, Object>> getRegularSplitChildType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Regular_Split_ChildType value : StaticDict.Regular_Split_ChildType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            map.put("moduleId", value.getModuleId());
            result.add(map);
        }
        return result;
    }



    /**
     * 业务费用 - 业务类型
     */
    @Getter
    public enum Cost_ModuleType {
        First(10,"入库"),
        Second(20, "出库"),
        Third(30, "仓租"),
        Fourth(40, "工单"),
        Fifth(1000, "其他");

        private final Integer value;
        private final String text;


        Cost_ModuleType(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Cost_ModuleType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    public static List<Map<Object, Object>> getCost_ModuleType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Cost_ModuleType value : StaticDict.Cost_ModuleType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }
    /**
     * 业务费用 -入库 -单据类型  和 OperateBill_Type 统一
     */

    @Getter
    public enum Cost_Input_OrderType {
        First("101,201","一件代发&备货中转入库"),
        Second("101", "一件代发入库"),
        Third("201", "备货中转入库"),
        Fourth("301", "退件"),
        Fifth("1001", "手动补录");

        private final String value;
        private final String text;


        Cost_Input_OrderType(String value, String text) {
            this.value = value;
            this.text = text;

        }
        //将入库单 inboundType转成 cost 的代码表字段
        public static String getOrderType(Integer value) {
            if (value == null) {
                return null;
            }
            if (1 == value) {
                return Cost_Input_OrderType.Second.getValue();
            } else if (2 == value) {
                return Cost_Input_OrderType.Third.getValue();
            }
            return null;
        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Cost_Input_OrderType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }
    public static List<Map<Object, Object>> getCost_Input_OrderType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Cost_Input_OrderType value : StaticDict.Cost_Input_OrderType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }

    /**
     * 业务费用 -出库 -单据类型
     */

    @Getter
    public enum Cost_Out_OrderType {
        First("401","一件代发出库"),
        Second("501", "批发出库"),
        DiaoBo("601", "调拨出库"),
        Fifth("1001", "手动补录");

        private final String value;
        private final String text;
        Cost_Out_OrderType(String value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Cost_Out_OrderType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    public static List<Map<Object, Object>> getCost_Out_OrderType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Cost_Out_OrderType value : StaticDict.Cost_Out_OrderType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }




    /**
     *操作费 条件变量
     */
    @Getter
    public enum OperateBill_ConditionCode {
        First(10110,"sku种类"),
        Second(10120, "箱子数量"),
        Third(10130, "单箱重量"),
        Fourth(10140, "单箱体积"),
        Fifth(10170, "单个sku重量"),
        Sixth(10190, "票体积"),
        Seventh(10200, "票总重"),
        Return_Pack_Count(20100, "包裹数量"),
        Return_Pack_SizeSum(20100, "包裹三边和");
        private final Integer value;
        private final String text;


        OperateBill_ConditionCode(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (OperateBill_ConditionCode type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "未知属性";
        }
    }


    /**
     * 计费变量
     */
    @Getter
    public enum OperateBill_CalCode {
        Code01(10100, "票", 1),
        Code02(10110, "SKU种类",1 ),
        Code03(10120, "箱子数量", 1),
        Code04(10130, "单箱重量", 0),
        Code05(10140, "单箱体积", 0),
//        Code06(10150, "SKU数量", 1),
//        Code07(10160, "单种SKU数量", 0),
        Code08(10170, "单个SKU重量", 0),
//        Code09(10180, "托盘数量", 1),
        Code10(10190, "票体积", 1),
        Code11(10200, "票总重", 1),
        Return_Pack_Count(20100, "包裹数量", 0);

//        Code12(10210, "单种FNSKU数量", 0),
//        Code13(10220, "单箱SKU种类", 0),
//        Code14(10230, "单箱SKU数量", 0),
//        Code19(10270, "箱子种类", 1),
//        Code16(10240, "包裹数量", 1),
//        Code17(10250, "FNSKU种类", 1),
//        Code18(10260, "单箱产品数量", 0);

        private Integer value;
        private String text;
        //计算方式 0求和 1单
        private int calType;

        OperateBill_CalCode(Integer value, String text, int calType) {
            this.value = value;
            this.text = text;
            this.calType = calType;
        }
        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (OperateBill_CalCode type : OperateBill_CalCode.values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }

        public static Integer getCalType(Integer value) {
            if (value == null) {
                return 0;
            }
            for (OperateBill_CalCode type : OperateBill_CalCode.values()) {
                if (value.equals(type.getValue())) {
                    return type.getCalType();
                }
            }
            return 0;
        }


    }
    public static List<Map<Object, Object>> getOperateBill_CalCode() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.OperateBill_CalCode value : StaticDict.OperateBill_CalCode.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    /**
     * 项目角色 系统分类
     */

    @Getter
    public enum System_RoleType {
        Labella_Old(1,"老项目角色"),
        Labella_New_Cus(2, "新项目前台角色"),
        Labella_New_Back(3, "新项目后台角色");
        private final Integer value;
        private final String text;
        System_RoleType(Integer value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (System_RoleType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "未知属性";
        }
        public static Integer getRoleType(String source) {
            if (StringUtils.isBlank(source)) {
                return null;
            }
            if ("oms".equals(source)) {
                return System_RoleType.Labella_New_Cus.getValue();
            }
            else if ("omp".equals(source) || "wms".equals(source) || "api".equals(source)) {
                return System_RoleType.Labella_New_Back.getValue();
            }
            return null;
        }
    }


    /**
     * 项目菜单 按钮系统分类
     */
    @Getter
    public enum System_MenuType {
        Labella_Old(0,"老项目菜单按钮"),
        Labella_Oms(1, "oms菜单按钮"),
        Labella_Omp(2, "omp菜单按钮"),
        Labella_Wms(3, "wms菜单按钮");

        private final Integer value;
        private final String text;


        System_MenuType(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (System_MenuType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "未知属性";
        }
        public static Integer getSystemMenuType(String source) {
            if (StringUtils.isBlank(source)) {
                return null;
            }
            if ("oms".equals(source)) {
                return System_MenuType.Labella_Oms.getValue();
            }
            else if ("omp".equals(source) ) {
                return System_MenuType.Labella_Omp.getValue();
            }
            else if ("wms".equals(source)) {
                return System_MenuType.Labella_Wms.getValue();
            }
            return null;
        }

        public static List<Integer> getMenuTypeForInit(String source) {
            if (StringUtils.isBlank(source)) {
                return new ArrayList<>();
            }
            if ("oms".equals(source)) {
                return Collections.singletonList(System_MenuType.Labella_Oms.getValue());
            }
            else if ("omp".equals(source) ) {
                return Arrays.asList(System_MenuType.Labella_Omp.getValue(),   System_MenuType.Labella_Wms.getValue());
            }
            else if ("wms".equals(source)) {
                return Collections.singletonList(System_MenuType.Labella_Wms.getValue());
            }
            return new ArrayList<>();
        }
    }


    /**
     * 项目类型
     */
    @Getter
    public enum System_Source {
        OMS("oms","OMS"),
        OMP("omp", "OMP"),
        WMS("wms", "WMS");

        private final String value;
        private final String text;
        System_Source(String value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (System_Source type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    /**
     * 次品处理oms状态
     */
    @Getter
    public enum Defective_Oms_Status {
        First(10, "草稿"),
        Second(20, "仓库处理中"),
        Third(50, "已完成"),
        Fourth(60, "已取消");

        private final Integer value;
        private final String text;
        Defective_Oms_Status(Integer value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Defective_Oms_Status type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "未知属性";
        }
    }


    /**
     * 次品处理wms状态
     */
    @Getter
    public enum Defective_Wms_Status {
        First(10, "待处理"),
        Second(20, "待拣货"),
        Third(30, "处理中"),
        Fourth(50, "已完成"),
        Fifth(60, "已取消");

        private final Integer value;
        private final String text;
        Defective_Wms_Status(Integer value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Defective_Wms_Status type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "未知属性";
        }
    }


    public static List<Map<Object, Object>> getDefective_Wms_Status() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Defective_Wms_Status value : StaticDict.Defective_Wms_Status.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }

    public static List<Map<Object, Object>> getDefective_Oms_Status() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Defective_Oms_Status value : StaticDict.Defective_Oms_Status.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    /**
     * 库存锁定记录表 orderType 锁定主表的类型
     */
    @Getter
    public enum Stock_Pick_OrderType {
        Defective("defective", "次品处理"),
        StockCheck("stockCheck", "盘点");


        private final String value;
        private final String text;
        Stock_Pick_OrderType(String value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(String value) {
            if (StringUtils.isBlank(value)) {
                return "";
            }
            for (Stock_Pick_OrderType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }



    @Getter
    public enum StockCheck_Status {
        First(10, "待盘点"),
        Second(20, "盘点中"),
        Third(30, "已盘点"),
        Fourth(50, "已作废");

        private final Integer value;
        private final String text;
        StockCheck_Status(Integer value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (StockCheck_Status type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "未知属性";
        }
    }


    public static List<Map<Object, Object>> getStockCheck_Status() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.StockCheck_Status value : StaticDict.StockCheck_Status.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }



    /**
     * 平台
     */
    @Getter
    public enum Store_PlatformCode {
        Amazon("amazon", "亚马逊"),
        Rakuten("rakuten", "乐天"),
        Shopify("shopify", "Shopify"),
        Qoo10("qoo10", "Qoo10"),
        Yahoo("yahoo", "雅虎"),
        Makeshop("makeshop", "Makeshop"),
        Wowma("wowma", "Wowma"),
        SuperDelivery("superDelivery", "SuperDelivery");



        private final String value;
        private final String text;
        Store_PlatformCode(String value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(String value) {
            if (StringUtils.isBlank(value)) {
                return "";
            }
            for (Store_PlatformCode type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    /**
     * 平台
     */
    @Getter
    public enum Platform_Store_AuthSyncStatus {
        Zero(0, "授权中"),
        One(1, "授权成功"),
        Two(2, "暂停同步"),
        Three(3, "授权失败"),
        Four(4, "授权过期");


        private final Integer value;
        private final String text;
        Platform_Store_AuthSyncStatus(Integer value, String text) {
            this.value = value;
            this.text = text;

        }
        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Platform_Store_AuthSyncStatus type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }
    public static List<Map<Object, Object>> getPlatform_Store_AuthSyncStatus() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Platform_Store_AuthSyncStatus value : StaticDict.Platform_Store_AuthSyncStatus.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }



    public static List<Map<Object, Object>> getStore_PlatformCode() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Store_PlatformCode value : StaticDict.Store_PlatformCode.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    /**
     * 平台订单-亚马逊市场 endPoint 对应店铺表 RegionCode
     */
    @Getter
    public enum PlatformOrder_Amazon_Market {
        NA("NA","北美", "https://sellingpartnerapi-na.amazon.com", "us-east-1",
                "A2Q3Y263D00KWC,A1AM78C64UM0Y8,ATVPDKIKX0DER,A2EUQ1WTGCTBG2", "https://sellercentral.amazon.com/"),
        FE("FE", "日本/新加坡/澳洲", "https://sellingpartnerapi-fe.amazon.com", "eu-west-2",
                "A1VC38T7YXB528,A39IBJ37TRP1C6,A19VAU5U5O7RUS", "https://sellercentral-japan.amazon.com/"),
        EU("EU", "欧洲/阿联酋/沙特阿拉伯", "https://sellingpartnerapi-eu.amazon.com", "us-west-1",
                "A21TJRUUN4KGV,A2VIGQ35RCS4UG,A33AVAJ2PDY3EV,APJ6JRA9NG5V4,A1PA6795UKMFR9,A1805IZSGTT6HS,A13V1IB3VIYZZH,A1F83G8C2ARO7P,A1RKKUPIHCS9HS", "https://sellercentral-europe.amazon.com/");


        private final String value;
        private final String text;
        private final String endpoint;
        private final String regionName;
        private final String marketplaceId;
        private final String centralUrl;
        PlatformOrder_Amazon_Market(String value, String text, String endpoint, String regionName, String marketplaceId, String centralUrl) {
            this.value = value;
            this.text = text;
            this.endpoint = endpoint;
            this.regionName = regionName;
            this.marketplaceId = marketplaceId;
            this.centralUrl = centralUrl;
        }
        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (PlatformOrder_Amazon_Market type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
        public static String getMarketplaceId(String value) {
            if (value == null) {
                return NA.marketplaceId;
            }
            for (PlatformOrder_Amazon_Market type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getMarketplaceId();
                }
            }
            return NA.marketplaceId;
        }
        public static String getEndpoint(String value) {
            if (value == null) {
                return NA.endpoint;
            }
            for (PlatformOrder_Amazon_Market type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getEndpoint();
                }
            }
            return NA.endpoint;
        }

        public static String getCentralUrl(String value) {
            if (value == null) {
                return NA.centralUrl;
            }
            for (PlatformOrder_Amazon_Market type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getCentralUrl();
                }
            }
            return NA.centralUrl;
        }

        public static String getRegionName(String value) {
            if (value == null) {
                return NA.regionName;
            }
            for (PlatformOrder_Amazon_Market type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getRegionName();
                }
            }
            return NA.regionName;
        }
    }
    public static List<Map<Object, Object>> getPlatformOrder_Amazon_Market() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.PlatformOrder_Amazon_Market value : StaticDict.PlatformOrder_Amazon_Market.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    /**
     * 平台状态
     */
    @Getter
    public enum Platform_Order_Status {
        Zero(0, "待处理"),
        One(1, "待获取平台面单"),
        Two(2, "处理中"),
        Three(3, "已发货"),
        Four(4, "已取消"),
        Five(5, "异常");

        private final Integer value;
        private final String text;


        Platform_Order_Status(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Platform_Order_Status type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    public static List<Map<Object, Object>> getPlatform_Order_Status() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Platform_Order_Status value : StaticDict.Platform_Order_Status.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    /**
     * 平台子状态
     */
    @Getter
    public enum Platform_Order_Sub_Status {
        Zero(0, "无"),
        One(10, "获取异常"),
        Two(11, "获取中"),
        Three(12, "生成出库单失败");

        private final Integer value;
        private final String text;


        Platform_Order_Sub_Status(Integer value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(Integer value) {
            if (value == null) {
                return "";
            }
            for (Platform_Order_Sub_Status type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }


    /**
     * 平台子状态
     */
    @Getter
    public enum Order_Outbound_ExceptionType {
        Zero("stock_third_Less", "三方仓库存异常"),
        One(SysConstant.Wms_Stock_Shortage, "WMS库存异常"),
        Three("push_third_error", "推送到代理仓异常"),
        Four("placeOrder_error", "下单异常"),
        Five("cancel_fail", "取消失败"),
        Other("Other", "其他");

        private final String value;
        private final String text;


        Order_Outbound_ExceptionType(String value, String text) {
            this.value = value;
            this.text = text;

        }

        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Order_Outbound_ExceptionType type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
    }

    public static List<Map<Object, Object>> getOrder_Outbound_ExceptionType() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Order_Outbound_ExceptionType value : StaticDict.Order_Outbound_ExceptionType.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }


    @Getter
    public enum Qoo10_ShippingStatus {
        First("1","配送待ち", "0"),//等待配送
        Second("2", "配送要請", "0"),//配送请求
        Third("3", "配送準備", "0"),//配送准备
        Fourth("4", "配送中", "4"),//配送中
        Fifth("5", " 配送完了", "5");
        private final String value;
        private final String text;
        private final String parent;
        Qoo10_ShippingStatus(String value, String text, String parent) {
            this.value = value;
            this.text = text;
            this.parent = parent;
        }
        public static String getText(String value) {
            if (value == null) {
                return "";
            }
            for (Qoo10_ShippingStatus type : values()) {
                if (value.equals(type.getValue())) {
                    return type.getText();
                }
            }
            return "";
        }
        public static Set<String> getParents() {
            Set<String> parents = new HashSet<>();
            for (Qoo10_ShippingStatus type : values()) {
               parents.add(type.parent);
            }
            return parents;
        }


    }
    public static List<Map<Object, Object>> getQoo10_ShippingStatus() {
        List<Map<Object, Object>> result = new ArrayList<>();
        for (StaticDict.Qoo10_ShippingStatus value : StaticDict.Qoo10_ShippingStatus.values()) {
            Map<Object, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("name", value.getText());
            result.add(map);
        }
        return result;
    }
}
